package com.optimatch.ui.view.customComponents.pages.creation_equipes;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import com.optimatch.ui.controler.Controler;

public class EquipesPanelRemoveListener implements ActionListener {

	private Controler controler;

	public EquipesPanelRemoveListener(Controler controler) {
		this.controler = controler;
	}

	@Override
	public void actionPerformed(ActionEvent arg0) {
		int row = controler.getView().getTabs().getEquipesPanel().getPan_list().getPanList().getSelectedRow();
		if (row != -1) {
//			controler.getView().getTabs().getEquipesPanel().getPan_list().getPanList().retirerEquipe(row);
			controler.getModel().retirerEquipe(row);
		}
	}

}
